﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace Baidu.Push.Api
{
    public class PushException : Exception
    {
        public PushException()
            : base()
        {
        }

        public PushException(string message)
            : base(message)
        {
        }

        protected PushException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public PushException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        public PushException(int errorCode, string errorMsg)
            : base(errorCode + ":" + errorMsg)
        {
            this.ErrorCode = errorCode;
            this.ErrorMsg = errorMsg;
        }

        public int ErrorCode { get; private set; }
        public string ErrorMsg { get; private set; }
    }
}
